import { ErrorRequestHandler } from "express";
import util from "util";

const errorHandler: ErrorRequestHandler = (err, req, res, next) => {
  res.status(500).json({
    error: util.format(err)
  });
};

export = () => errorHandler;
